package com.matrix.app.flux.aichat.service;

import com.matrix.app.flux.aichat.data.AiChatRequestDto;
import com.matrix.app.flux.aichat.data.AiChatResponseVo;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * AI聊天服务接口
 *
 * Copyright © 海平面工作室 版权所有
 *
 * @Author: Leo
 * @Create: 2024-01-22 10:00:00
 * @Since 1.2
 */
public interface AiChatService {

    /**
     * 发送聊天消息
     *
     * @param request 聊天请求
     * @return 聊天响应
     */
    Mono<AiChatResponseVo> chat(AiChatRequestDto request);

    /**
     * 流式聊天
     *
     * @param request 聊天请求
     * @return 流式响应
     */
    Flux<String> streamChat(AiChatRequestDto request);
}